package io;

import org.omg.CORBA.ARG_OUT;

import java.io.*;

/**
 * 使用缓冲字符输入流BufferReader按行读取字符串
 */
public class BrDemo {
    public static void main(String[] args) throws IOException {
        /*FileInputStream fis = new FileInputStream("./src/io/BrDemo.java");
        InputStreamReader isr = new InputStreamReader(fis);
        BufferedReader br = new BufferedReader(isr);

        String line;
        while((line=br.readLine())!=null){
            System.out.println(line);
        }
        br.close();*/
        /*FileInputStream fis = new FileInputStream("./src/io/BrDemo.java");
        InputStreamReader isr = new InputStreamReader(fis);
        BufferedReader br = new BufferedReader(isr);
        String line;
        while((line=br.readLine())!=null){
            System.out.println(line);
        }
        br.close();*/
        /*FileInputStream fis = new FileInputStream("./src/io/BrDemo.java");
        InputStreamReader isr = new InputStreamReader(fis);
        BufferedReader br = new BufferedReader(isr);
        String line;
        while((line=br.readLine())!=null){
            System.out.println(line);
        }
        br.close();*/
        FileInputStream fis = new FileInputStream("./src/io/BrDemo.java");
        InputStreamReader isr = new InputStreamReader(fis);
        BufferedReader br = new BufferedReader(isr);
        String line ;
        while((line=br.readLine())!=null){
            System.out.println(line);
        }
        br.close();
    }
}
